using System;
using System.Collections.Generic;
using System.Text;
using Mpi.Common.Collections;

namespace Xeml.Document
{
    public class TaggedAnnotationCollection : ObservableIdCollectionBase<TaggedAnnotation, string>
    {
        public TaggedAnnotationCollection()
            :base()
        {
        }

        public TaggedAnnotationCollection(IEnumerable<TaggedAnnotation> iEnumerable)
            : base(iEnumerable)
        {
        }

        protected override string GetIdentifiere(TaggedAnnotation item)
        {
            return item.Tag;
        }

        protected override void SetOwner(TaggedAnnotation item)
        {
            item.Collection = this;
        }

        protected override void RemoveOwner(TaggedAnnotation item)
        {
            item.Collection = null;
        }
    }
}
